package com.jackykeke.app;

import android.content.Context;
import android.os.Environment;
import android.text.TextUtils;


import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AppContants {
    public static final String LOG_TYPE = "Android";

    public static final String APP_ID = "wx0d3838845f4bd746";

    public static final int ERROR = 0;

    public static final int SUCCESS = 1;

    public static final int NET_WORK_ERROR = 2;

    public static final int SERVER_ERROR = 3;

    public static final int NEED_RELOGIN = 4;

    public static final String ATY_MAIN = "AtyMain";

    public static final String LOG_OUT = "LogOut";

    public static class IS_OK_CODE {

        public static final String NOT_OK = "0";

        public static final String OK = "1";

        public static final String SECOND = "2";

        public static final String THIRD = "3";

    }

    public static class POSTPARAMS {

        public static final String EMPNO = "EmpNo";

        public static final String FUNC = "Func";

    }

    public static class SYS_CONF {

        public static final String SYS_SHAREDPREF = "SYS_SHAREDPREF";

        public static final String AUTO_LOGIN_KEY = "AUTO_LOGIN_KEY";

        /**
         * 登入者的工号
         */
        public static final String SYS_USER_ID = "USER_ID";

        /**
         * 最后一次登陆时间
         */
        public static final String LAST_LOGIN_TIME = "LAST_LOGIN_TIME";
        /**
         * 第一次登陆状态
         */
        public static final String IS_FIRST_LOGIN = "IS_FIRST_LOGIN";

        /**
         * NetWorkState
         */
        public static final String NETWORK_STATE = "NETWORK_STATE";

        /**
         * 设备锁的状态
         */
        public static final String IS_DEVICE_LOCK = "IS_DEVICE_LOCK";

        /**
         * 最后一次获取动态密码时间
         */
        public static final String DYNAMIC_PWD_TIME = "DYNAMIC_PWD_TIME";
        /**
         * 最后一次打开APP时间
         */
        public static final String OPEN_APP_TIME = "OPEN_APP_TIME";
        /**
         * 最后一次使用口令密码时间
         */
        public static final String USE_LOGIN_PWD_TIME = "USE_LOGIN_PWD_TIME";

        public static final String IS_SECURITY_AUTHORIZED = "IS_SECURITY_AUTHORIZED";

        public static final String IS_APPNEED_UPDATE = "IS_APPNEED_UPDATE";

        public static final String SALARYCONFIRMCOUNT = "SALARYCONFIRMCOUNT";

        public static final String RESIDEMENUUSERINFO_CACHE = "RESIDEMENUUSERINFO_CACHE";
        /**
         * 是否引导用户
         */
        public static final String IS_GUIDE_USER = "IS_GUIDE_USER";
        public static final String IS_SIGN = "IS_SIGN";
        /**
         * 用户告知书签核状态
         */
        public static final String IS_AGREE_SERVICE_TERMS = "IsAgreeServiceTerms";

        /**
         * 违规违纪
         */
        public static final String IS_MALFEASANCE_AGREE = "IsMalfeasanceAgree";

        /**
         * 我的书架中是否清空list
         */
        public static final String IS_MYBOOKCLEAR = "IsMyBookClear";

        public static final String SIGN_TIME = "SIGN_TIME";

        public static final String SIGN_URL = "SIGN_URL";

        public static final String IS_SIGN_DIALOG = "IS_SIGN_DIALOG";

        public static final String HAVE_NEWS = "HAVE_NEWS";

        public static final String IS_CONNECT_SERVER = "IS_CONNECT_SERVER";

        public static final String NEED_SHOW_AD = "NEED_SHOW_AD";

        public static final String MICRO_CLASS_START_COUNT = "MICRO_CLASS_START_COUNT";
        public static final String IS_INNER_LOGIN = "IS_INNER_LOGIN";// 是否内部员工登录
        public static final String SYS_VISITOR_ID = "SYS_VISITOR_ID";// 游客登录名
        public static final String IS_LOGIN = "IS_LOGIN";// 是否登录
        public static final String USER_NAME = "USER_NAME";// 用户名

        public static final String LIFE_FRIST = "LIFE_NEW";// 是否第一次进入园区生活

        public static final String LAST_VERSON_CODE = "LAST_VERSON_CODE";

        public static final String IS_USER_LOGIN = "IS_USER_LOGIN";

        public static final String USER_TYPE = "USER_TYPE";

        public static final String MENU_VERSION = "MENU_VERSION";

        public static final String IPORTAL = "iportal:";

        public static final String USER_TEL_NUM = "USER_TEL_NUM";// 用户手机号
        /**
         * 是否是跑男
         */
        public static final String IS_RUNNER = "IS_RUNNER";

        public static final String IS_CHANGE_USER = "IS_CHANGE_USER";

        public static final String IDCARD = "IDCARD";// 身份证号
        public static final String UID = "Uid";// Uid

        public static final String IS_SHOW_MANANGE_GUIDE = "IS_SHOW_MANANGE_GUIDE";

        public static final String USER_IDCARD = "USER_IDCARD";//身份证号码

        public static final String USER_NO_BANK = "USER_NO_BANK";//身份证号码

        public static final String ALARM_LIST = "ALARM_LIST"; //闹钟列表

        public static final String SEARCH_HISTORY = "SEARCH_HISTORY";//文学社搜索记录

        public static final String WEATHER_CITY = "WEATHER_CITY"; //天气城市

        public static final String WEATHER = "WEATHER";//天气

        public static final String WEATHER_BG = "WEATHER_BG";//天气背景

        public static final String SELECT_PLACE = "SELECT_PLACE";//天气背景

        public static final String CUSTOM_SERVICE_TOKEN = "TOKEN"; //云问客服token

        public static final String CS_TOKEN_TIME = "TOKEN_TIME"; //云问客服token获取时间

        public static final String HEADICONPATH = "HEADICONPATH";

        /**
         * 微信分享記錄
         */
        public static final String RECORD = "record";// 微信分享記錄用戶id

        public static final String IS_DEBUG_MODEL = "IS_DEBUG_MODEL";//是否开启Debug模式--测试问题反馈
    }

    public static class SYS_ACTION {

        public static final String REQUEST_NEWS_ACTION = "com.foxconn.iportal.requestNewsAction";

        public static final String NEWS_BEAN = "APPNEWS_BEAN";

        public static final String REFRESH_MENU_ACTION = "com.foxconn.iportal.refreshMenuAction";

    }

    public static class GJJTransfer {

        public static final String PERSONID = "4080";

        public static final String HUKOUID = "5594";

        /**
         * 提取
         */
        public static final String TIQU_ID = "1";
        public static final String TIQU_ID_STR = "提取";

        /**
         * 转移
         */
        public static final String ZHUANYI_ID = "0";
        public static final String ZHUANYI_ID_STR = "转移";

    }

    /**
     * 侧滑信息
     *
     * @author H2601985
     */
    public static class RESIDE_MENU {
        public static final String WORK_SORT = "今日班别";
        public static final String WORK_ATTENDANCE = "刷卡考勤(今日)";
        public static final String CONSUMPTION = "消费记录(本月)";
        public static final String OVER_TIME = "加班申请时数(本月)";
        public static final String OVER_TIME_1 = "加班确认时数(本月)";
        public static final String REST = "请假信息(本月)";
        public static final String REWARDS_PUNISHMENT = "奖惩信息(本年)";
        public static final String REST_YEAR = "年休假";
        public static final String ABOUT = "关于";

        public static final String OVER_TIME_CONTENT = "G1: G2: G3: ";
    }

    /**
     * 个人信息
     *
     * @author H2601985
     */
    public static class USER_INFO_CENTER {
        public static final String TITLE = "人事信息";
        public static final String TEL_NO_TV = "分机";
        public static final String PHONE_NO_TV = "手机";
        public static final String SHORT_NO_TV = "短号";
        public static final String EMAIL_TV = "邮箱";
        public static final String QQ_TV = "QQ";
        public static final String WEIXIN_TV = "微信";
        public static final String LINE_TV = "Line";
        public static final String SINA_TV = "新浪微博";
        public static final String BASE_INFO_TV = "基本信息";
        public static final String ABOUT_TV = "关于";
    }

    /**
     * 设置
     *
     * @author H2601985
     */
    public static class SETTING {
        public static final String TITLE = "设置";
        public static final String CHANGE_LOGIN_PW = "修改口令密码";
        public static final String GESTURE_PWD_TV = "修改手势密码";
        public static final String DEVICE_LOCK_TV = "设备锁";
        public static final String CHANGE_MESSAGE = "个人信息查看及修改";
        public static final String SETTING_ABOUT_TV = "关于";
    }

    public static class SALARY_QUERY {
        public static final String SALARY_QUERY_PLATFORM = "Android";
        public static final String SALARY_QUERY_LIANTONG = "21514";
        public static final String SALARY_QUERY_YIDONG = "21513";
        public static final String SALARY_QUERY_DIANXIN = "21515";
        public static final String SALARY_BUMEN = "部门";
        public static final String SALARY_NAME = "姓名";
        public static final String SALARY_ACCOUNT = "工号";
        public static final String SALARY_ZIWEI = "资位";
        public static final String SALARY_COMDATA = "入厂日期";
        public static final String SALARY_PHONENUM = "手机号码";

    }

    /**
     * 基本信息
     *
     * @author H2601985
     */
    public static class BASE_INFO {
        public static final String TITLE = "基本信息";
        public static final String DEPT_NAME = "部门";
        public static final String WORK_FACTORY = "厂区";
        public static final String IN_FOXCONN_DATE = "入厂日期";
        public static final String IN_GROUP_DATE = "入事业群日期";
        public static final String IN_YEARS = "年资";
        public static final String EMPLOYEE_TYPE = "用工类型";
        public static final String URGENT_MAN = "紧急联络人";
        public static final String URGENCY_TEL = "紧急联络电话";
        public static final String POST_RANK = "职系";
        public static final String COMMITTEE = "技委会";
        public static final String HEAD_SHIP = "管理职";
        public static final String TECHNOLOGY_NAME = "工程技术职";
        public static final String PROFESSIONAL_NAME = "专案行政职";
        public static final String POST_LEVEL = "资位";
        public static final String SUI_XIAN = "随线性质";
        public static final String IS_KEY = "是否关键工站人员";
        public static final String OVERTIME_MODE = "加班类别";
        public static final String CARD_END_DATE = "身份证迄止日";
        public static final String EDUCATION = "学历信息";
        public static final String POLITICAL_ASPECT = "政治面貌";
        public static final String RECRUITMENT_ADDRESS = "籍贯";
        public static final String RPR_TYPE = "户口类型";
        public static final String RPR_ADDRESS = "户籍所在地";
        public static final String IS_MARRY = "婚姻状况";
        public static final String LIVE_STATUS = "住宿状况";
        public static final String LIVE_ADDRESS = "住宿地址";
        public static final String INSURANCE_NO = "社保卡编号";
        public static final String COMPUTER_NO = "社保卡电脑编号";
        public static final String INSURANCE_AREA = "投保区域";
        public static final String CORPORATION = "法人";
        public static final String POST_ABILITY = "职能";
        public static final String CONTROL_SYSTEM = "管制系统";
        public static final String DLIDL = "直间接关系";
    }

    /**
     * handler msg.what
     *
     * @author H2601985
     */
    public static class LOAD {
        public static final int LOAD_SUCCESS = 0;
        public static final int LOAD_ERROR = 1;
        public static final int LOAD_ICON = 2;
        public static final int LOAD_ICON_ERROR = 3;
        public static final String LOAD_USRINFO = "loadUserInfo";
        public static final String SUCCESS = "load_success";
        public static final String LOAD_SALARY_COUNT = "loadSalaryCount";
    }

    /**
     * webview框架
     *
     * @author H2601985
     */
    public static class WEBVIEW {
        public static final String ITEMINFO = "itemInfo";
        public static final String TITLE = "title";
        public static final String URL = "url";
        public static final String RESTAPPLY = "请假调休";
        public static final String LEAVE = "离职";
        public static final String PERSONNEL_CHANGES = "人事异动";
        public static final String CONTRACT = "合同查询";
        public static final String WORK_ATTENDANCE = "刷卡考勤";
        public static final String OVER_TIME = "加班记录";
        public static final String REWARDS_PUNISHMENT = "奖惩信息";
        public static final String REST_YEAR = "年休假";
        public static final String REST = "请假记录";
        public static final String CONSUMPTION = "消费记录";
        public static final String CHECKMOUNT = "上岗查询";
        public static final String CERTIFITION = "证照查询";
        public static final String CAR_CONSUMPTION = "乘车消费";
        public static final String SHOE_QUERY = "鞋柜查询";
        public static final String ADD = "添加";
        public static final String ADDRESS_BOOK = "通讯录";
        public static final String CREDIT_QUERY = "学分查询";
        public static final String NOT_WORK = "旷工查询";
        public static final String PERFORMANCE_QUERY = "绩效查询";
        public static final String HEALTH_QUERY = "体检信息";
        public static final String ENTRANCE = "门禁权限";
        public static final String EXCEPTION = "过门异常";
        public static final String DISTRIBUTE = "新人分发信息";
        public static final String SENIORITY = "年资查询";
        public static final String TODAY_WORKING_HOURS = "每日工时";
        public static final String VIOLATE_RECORD = "违纪处理规定宣导书";
        public static final String ANNUAL_IO_DETAIL = "年度收支明细";
        public static final String SCAN_RESULT = "扫码结果";

        public static final String PZ_OVER_TIME = "加班记录";
        public static final String PZ_REST = "请假记录";

    }

    public static class MOBILE_OFFICING {
        public static final String REST_APPLY = "请假申请";
        public static final String DAYS_OFF = "调休申请";
        public static final String LEAVE = "离职申请";
        public static final String SALAR_CONFIRM = "薪资单领取确认单";
        public static final String OVERTIMEAGREE = "加班同意书";
        public static final String AFFIRMAGREE = "计薪加班确认书";
        public static final String BT_INFORMED_CONSENT = "调班补班同意书";
        public static final String LEAVE_APPLICATION_TRACE = "离职单追踪";
        public static final String MO_DAYS_OFF_TRACK = "调休单追踪";
        public static final String VACATE_TRACK = "请假单追踪";
        public static final String key_post_allowance_confirmation = "关键岗位津贴确认书";
        public static final String NUMBER_KNOW_ALL = "号码百事通";
        public static final String APPLY_OVERTIME_WORKING = "个人加班预申请单";
        public static final String ABNORMAL_REPLY_FORM = "个人考勤异常回复单";
        public static final String REMOVE_NAME_TRACK = "除名单追踪";
        public static final String RESIGNATION_HANDOVER = "离职交接办理";
        public static final String RESIGNATION_HANDOVER_CONFIRM = "离职当月考勤信息";
    }

    public static class POCKET_TREASURE {
        public static final String PAY = "薪资单";
        public static final String DAILY_PAY = "日结薪资";
        public static final String MY_EQUITIES = "卡券";
        public static final String ANNUAL_IO_DETAIL = "年度收支明细";
    }

    public static class TALENT_PRAISE {
        public static final String INTENAL_RECOMMEND = "内部推荐";
        public static final String LIMITED_SPIKE = "限量秒杀";
        public static final String INTEGRAL_SIGN = "每日签到";
        public static final String MY_ORDERS = "我的订单";
        public static final String LUCKY_TURNTABLE = "转盘抽奖";
        public static final String PRIZE_RECORD = "中奖记录";
        public static final String HIT_GOLDEN_EGG = "砸金蛋";
        public static final String ACTIVITY_ENTRY = "活动报名";
        public static final String TAX_QUERY = "超12W个税查询";
        public static final String RETRIEVE_ACCOUNT = "账号申诉";

    }

    public static class SPIRIT_FOOD {
        public static final String MY_BOOKSHELF = "我的书架";
        public static final String MY_BOOKCITY = "书城";
        public static final String MICRO_CLASS = "小微课堂";
    }

    /**
     * 薪资单领取确认单
     *
     * @author H2601985
     */
    public static class SALARY_CONFIRM {
        public static final String MONTH = "月份：";
        public static final String STATUS = "状态：";
        public static final String GET_TIME = "发薪时间：";
        public static final String ISSUE_TIME = "确认时间：";
        public static final String STATUS_CONTENT = "待确认";
        public static final String MARKED_WORDS1 = "同仁，感谢您的辛勤工作。以下为";
        public static final String MARKED_WORDS2 = "的电子薪资单或纸质薪资单领取确认回执，请签收。";
        public static final String CONFIRM_TITLE = "薪资单领取回执";
    }

    public static class DOWN_LOAD {
        public static final int DOWNLOAD_PREPARE = 3;
        public static final int DOWNLOAD_ERROR = 0;
        public static final int DOWNLOAD_WORK = 2;
        public static final int DOWNLOAD_OK = 1;
    }

    public static class SALARY_LOGIN {
        public static final String FLAG = "FLAG";
        public static final String TAG1 = "SalaryManualSignPersonMain";
        public static final String TAG2 = "SalaryDailyAty";
        public static final String TAG3 = "AtyPerformanceQuery";
        public static final String TAG4 = "AtyVacateSubmit";
        public static final String TAG5 = "AtyMODaysOff";
        public static final String TAG6 = "AtyLeaveApplication";
        public static final String TAG8 = "AtyAnnualInOutDetail02"; // 年度收支WebView的Aty
        public static final String TAG9 = "AtyAffirmAgreeBook";
        public static final String TAG10 = "AtyOverTimeAgreebook";
        public static final String TAG11 = "AtyKeyPostAllowanceConfirmBook";
        public static final String TAG12 = "薪资单领取确认单未签核";
        public static final String TAG13 = "薪资单领取确认单已签核";
        public static final String TAG14 = "薪资单口令码签核";
        public static final String TAG15 = "AtyResignationAttendanceInfo";// 离职考勤信息
        public static final String TAG16 = "AtyAreaLifeClothesTake";// 园区生活-工衣领取信息提交
        public static final String TAG17 = "AtyAreaLifeClothesTakeMsg";// 园区生活-获取工衣领取信息
        public static final String TAG18 = "AtyAreaLifeClothesChange";// 园区生活-工衣置换
        public static final String TAG19 = "AtyAreaLifeClothesChangeMsg";// 园区生活-工衣置换领取确认
        public static final String TAG20 = "AtyAreaLifeResideOut";// 园区生活-外住申请
        public static final String TAG21 = "AtyAreaLifeResideRepair";// 园区生活-报修申请
        public static final String AtyFactorySupportApply = "AtyFactorySupportApply";// 园区生活-报修申请单详细信息

        public static final String TAG22 = "AtyAreaLifeResideRepairDetail";
        public static final String RESIGNATION_ATTENDANCE = "离职考勤确认";// 离职考勤信息
        public static final String ANNUAL_DETAIL = "年度收支明细";
        public static final String TAG7 = "AtyTaxQuery";
        public static final String DAILY_TITLE = "日结薪资查询";
        public static final String PERFORMANCE_TITLE = "绩效查询";
        public static final String VACATE_TITLE = "密码验证";
        public static final String SALARY_ID = "801";
        public static final String DAILY_ID = "802";
        public static final String PERFROMANCE_ID = "215";
        public static final String ANNUAL_DETAIL_ID = "806";
        public static final String LUCK_SCAN_ID = "408";
        public static final String TODAY_ID = "313";
        public static final String TODAY_ID_PZ = "130203";

		/*
         * public static final String VACATE_ID = "301"; public static final
		 * String MODAYS_ID = "302"; public static final String LEAVE_ID =
		 * "303";
		 */

        public static final String TAX_QUERY = "805";// 十二万个税
        public static final String FORM_SIGN = "10";// 管理专区
    }

    public static class SALARY_DAILY {
        public static final String DAILY_TITLE = "日结薪资";
        public static final String DETAIL_TITLE = "日结薪资明细";
    }

    /**
     * 关于
     *
     * @author H2601985
     */
    public static class ABOUT {
        public static final String TITLE = "关于爱口袋";
        public static final String VERSION_UPDATE = "版本更新";
        public static final String FUNCTION_INTRODUCE = "功能介绍";
        public static final String HELP_FEEDBACK = "帮助与反馈(客服待确认)";
        public static final String ACTIVITY_DETAIL = "活动详情";// 新增
        public static final String DOWNLOAD = "扫码下载";
    }

    /**
     * 公告速递
     *
     * @author H2603133
     */
    public static class NOTICE {
        public static final String NOTICE_TITLE = "公告详情";
        public static final String NOTICE = "新闻";
        public static final String EMPLOYEE = "员工手册";
        public static final String TODAY_WORK = "每日工时";
    }

    public static class LOCK_DEVICE_SETTING {
        public static final String IS_SETTING_LOCK_VIEW = "IS_SETTING_LOCK_VIEW";
        public static final String LOCK_DEVICE_SETTING = "LOCK_DEVICE_SETTING";
        public static final String LOCJK_CONTENT = "关于爱口袋";
    }

    /**
     * 消息推送
     *
     * @author H2601985
     */
    public static class Params {
        public static String DEFAULT_PRE_NAME = "defaultAccount";
        public static String SERVER_IP = "serverIp";
        public static String SERVER_PORT = "serverPort";
        public static String PUSH_PORT = "pushPort";
        public static String USER_NAME = "userName";
        public static String SENT_PKGS = "sentPkgs";
        public static String RECEIVE_PKGS = "receivePkgs";
    }

    /**
     * @author H2601985
     */
    public static class Config {
        public static final boolean DEVELOPER_MODE = false;
    }

    public static class SYS_DIR_CONF {
        /**
         * 本地目录存储的根目录
         */
            public static final String LocalHost_dirpath = "/AAAIportal";
        /**
         * 本地目录存储的根目录
         */
        public static final String LocalHost_dirpath_complete = getLocalHost_dirPath() + "/Iportal";

        /**
         * app 更新 apk存放的目录
         */
        public static final String UpdateApp_dirpath = LocalHost_dirpath + "/updateapk/";

        /**
         * 用户头像
         */
        public static final String Usericon_dirPath = LocalHost_dirpath + "/.headicon/";

        /**
         * 系统崩溃日志记录
         */
        public static final String App_crashLog_dirPath = LocalHost_dirpath + "/.crashlog/";

        /**
         * 文档目录
         */
        public static final String Book_save_dirpath = getLocalHost_dirPath() + LocalHost_dirpath + "/book/";
        /**
         * cache
         */
        public static final String cache_dirpath = getLocalHost_dirPath() + LocalHost_dirpath + "/ICache/";

        /**
         * 文档目录
         */
        public static final String File_save_dirpath = getLocalHost_dirPath() + LocalHost_dirpath + "/file/";

        /**
         * 菜单图标
         */
        public static final String Menu_Icon_dirpath = getLocalHost_dirPath() + LocalHost_dirpath + "/.MenuIcon/";

        /**
         * 图片缓存目录
         */
        public static final String Icon_Cache_dirpath = getLocalHost_dirPath() + LocalHost_dirpath
                + "/.imageloader/cache/";

        /**
         * 主题存放目录
         */
        public static final String Theme_save_dirPath = getLocalHost_dirPath() + LocalHost_dirpath + "/.Theme/";

        /**
         * mp3
         */
        public static final String MP3_save_dirPath = getLocalHost_dirPath() + LocalHost_dirpath + "/Mp3/";

        /**
         * 图片压缩包
         */
        public static final String MENU_ICON_ZIP = "menu_icon.zip";

        /**
         * 识别身份证
         */
        public static final String TESSBASE_PATH = getLocalHost_dirPath() + LocalHost_dirpath + "/.tesseract/";
        public static final String TESSDATA_PATH = TESSBASE_PATH + "tessdata/";


        /**
         * 下载的网页zip包地址
         */
        public static final String OnlineWeb_save_dirPath = getLocalHost_dirPath() + LocalHost_dirpath + "/OnlineWeb/";

        /**
         * 在线的网页zip包地址
         */
        public static final String OnlineWeb_save_dirPath_1 = getLocalHost_dirPath() + LocalHost_dirpath + "/OnlineWeb1/";

        /**
         * 清除所有用户信息
         */
        public static final void clearAllFiles() {

            File files = new File(getLocalHost_dirPath() + LocalHost_dirpath);
            if (files.isDirectory()) {
                File[] allFiles = files.listFiles();
                for (File file : allFiles) {
                    file.delete();
                }
            } else {
                File[] allFiles = files.listFiles();
                for (File file : allFiles) {
                    file.delete();
                }
            }
        }

        public static boolean isSdPresent() {
            return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
        }

        static {
            initUpdateapkDirPath();
            initHeadIconDirPath();
            initCrashLogDirPath();
            initBookDirPath();
            initCacheDirPath();
            initMenuIconDirPath();
        }

        public static void initBookDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }
                File dirFile = new File(localhost_dirpath + App_crashLog_dirPath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initCrashLogDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }
                File dirFile = new File(localhost_dirpath + App_crashLog_dirPath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initUpdateapkDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }

                File dirFile = new File(localhost_dirpath + UpdateApp_dirpath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initHeadIconDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }

                File dirFile = new File(localhost_dirpath + Usericon_dirPath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initCacheDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }

                File dirFile = new File(cache_dirpath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initMenuIconDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }

                File dirFile = new File(Menu_Icon_dirpath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initThemeSaveDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }
                File dirFile = new File(Theme_save_dirPath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public static void initMp3SaveDirPath() {
            try {
                String localhost_dirpath = getLocalHost_dirPath();
                if (TextUtils.isEmpty(localhost_dirpath)) {
                    return;
                }
                File dirFile = new File(MP3_save_dirPath);
                if (!dirFile.exists()) {
                    dirFile.mkdirs();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        /**
         * 获取本地存储的根路径.
         *
         * @return 如果SD卡不存在, 或状态不可用则返回""; 可用则返回SD卡根目录路径.
         */
        public static String getLocalHost_dirPath() {
            if (isSdPresent()) {
                // return App.getInstance()
                // .getExternalFilesDir(Environment.DIRECTORY_PICTURES)
                // .getAbsolutePath();
                return Environment.getExternalStorageDirectory().getAbsolutePath();
            } else {
                // / SD 卡不存在
                throw new IllegalArgumentException("sd card is not exists..");
            }
        }

        /**
         * 头像路径 时间：2016年6月17日
         */
        public static String getHeadIconPath(String username) {

            String usericon_dirpath = getLocalHost_dirPath() + Usericon_dirPath + username + ".png";// 用户头像地址
            return usericon_dirpath;

        }

        /**
         * 小图标目录
         */
        public static String getMenuIconPath(Context c, String url, String cachePath) {
            String path = "";
            try {
                path = c.getExternalFilesDir(Environment.DIRECTORY_PICTURES).getAbsolutePath() + cachePath
                        + url.replaceAll("/", "");
            } catch (Exception e) {

            }
            return path;
        }

        /**
         * 我的二维码路径 时间：2016年6月17日
         */
        public static String getQrCodePath() {

            String usericon_dirpath = cache_dirpath + "qrcode.png";// 我的二维码路径
            return usericon_dirpath;

        }

        /**
         * 园区生活二维码路径 时间：2017年04月15日
         */
        public static String getLifeQrCodePath() {

            String usericon_dirpath = cache_dirpath + "qrcodeLife.png";
            return usericon_dirpath;

        }

        /**
         * 充值--获取兑换记录 二维码路径 时间：2017年07月25日
         */
        public static String getRechargeQrCodePath() {

            String usericon_dirpath = cache_dirpath + "qrcodeRecharge.png";
            return usericon_dirpath;

        }

        /**
         * 邀请亲友二维码路径 时间：2016年6月22日
         */
        public static String getQrInviteCodePath() {
            String invite_qrcode_path = cache_dirpath + "invite_qrcode.png";
            return invite_qrcode_path;
        }

        /**
         * <li>描述：创建文件夹
         * <li>时间：2016年7月15日
         * <li>author： H2601977
         */
        public static void createFileDirectory() {

            AppContants.SYS_DIR_CONF.initUpdateapkDirPath();
            AppContants.SYS_DIR_CONF.initHeadIconDirPath();
            AppContants.SYS_DIR_CONF.initCrashLogDirPath();
            AppContants.SYS_DIR_CONF.initBookDirPath();
            AppContants.SYS_DIR_CONF.initCacheDirPath();
            AppContants.SYS_DIR_CONF.initMenuIconDirPath();
        }

        /**
         * @describe 截屏后存储的缓存目录
         * @author H2601977
         * @date 2018/6/30 11:28
         */
        public static String getScreenShotPath() {
            String filePath = cache_dirpath + "screenshot.jpeg";
            return filePath;
        }
    }

    public static class SERVER_STATUS {

        public static final int SUCESS = 1;

        public static final int SERVER_ERROR = 3;

        public static final int NO_VALUE = 2;

        public static final int ERROR = 0;

    }

    public static final int HIT_EGG_FLAG = 407;

    public static class IS_PLAN {
        public static final String YES = "1";
        public static final String NO = "0";
    }

    /**
     * 用户权限
     *
     * @author H2601985
     */
    public static class USER_PERMISSION {

        /**
         * 用户拥有权限
         */
        public static final String HAVE = "0";
        // /**
        // * 用户没有权限
        // */
        // public static final String NO_HAVE = "0";
        // /**
        // * 用户未登录
        // */
        // public static final String NO_LOGIN = "-1";
        /**
         * 开发中
         */
        public static final String DEVELOP = "1";

        /**
         * 规划中
         */
        public static final String PLAN = "2";
        /**
         * 登录后使用
         */
        public static final String NEED_LOGIN = "3";

        /**
         * 主菜单,拥有二级菜单
         */
        public static final String PARENT_MENU = "0";
        /**
         * 进入原生界面
         */
        public static final String NATIVE_MENU = "1";
        /**
         * 进入web页面
         */
        public static final String WEB_MENU = "2";
        /**
         * 先调Service判断是原生还是webview
         */
        public static final String SERVICE_MENU = "3";

        /**
         * 1与2的综合
         */
        public static final String COMMON_MENU = "4";
        /**
         * 方法
         */
        public static final String METHOD_MENU = "5";

        public static final String WECHAT_PUBLIC_MENU = "6";


        public static final String IS_DEVELOP = " 开发中";
        public static final String IS_PLAN = " 规划中";

        public static final String IDPBG = "30567";
        public static final String IDPBG_PZ = "30568";

        public static final String VISITOR = "30566";
        public static final String IPEBG = "30569";
        public static final String IPEBG_PZ = "30570";
        public static final String NO_USER_LOGIN = "30565";

    }

    /**
     * pz版
     *
     * @author H2601985
     */
    public static class CHECK_LOGIN {
        public static final String FLAG = "FLAG";
        public static final String TAG1 = "SalaryManualSignPersonMain";
        public static final String TAG3 = "AtyPZPerformanceQuery";
        public static final String TAG4 = "AtyPZVacateSubmit";
        public static final String TAG5 = "AtyMOFormSign";
        public static final String TAG6 = "中港津贴领取确认单未确认";
        public static final String TAG7 = "中港津贴领取确认单已确认";
        public static final String TAG8 = "AtySalarySubsidyAgree";
        public static final String TAG9 = "SalarySubsidy";
        public static final String PZ_PERFORMANCE_TITLE = "绩效查询";
        public static final String VACATE_TITLE = "密码验证";
        public static final String FORM_SIGN_TITLE = "表单签核";
        public static final String SALARY_SUBSIDY = "中港津贴查询";
        public static final String SALARY_SUBSIDY_NAME = "AtyName";

        public static final String PZ_PERFROMANCE_ID = "1304";
        public static final String SALARY_SUBSIDY_MONTH = "MONTH";
    }

    public static class FORM_SIGN {
        public static final String WATI_SIGN_LIST_RESULT = "WaitSignListResult";
        public static final String LOGIN_PWD = "LOGIN_PWD";
        public static final String URL = "URL";
        public static final String FORM_ID = "FORM_ID";
        public static final String FORM_CODE = "FORM_CODE";
        public static final String PAGE_ID = "PAGE_ID";
        public static final String BATCH_ID = "BATCH_ID";
        public static final String TITLE = "title";
        public static final String UPLOAD = "1341";
        public static final String REFUSE = "1344";
        public static final String STR_STEP = "ApproveRoute";
        public static final String[] SUFFIXS = {".doc", ".xls", ".ppt", ".pdf", ".txt", ".png", ".jpg"};
        public static final String[] SIGN_CIRCLE = {"track_gray", "track_green", "track_red"};
        public static final String[] SIGN_COLOR = {"#FFBBBBBB", "#3FBCA2", "#ff0000"};
    }

    public static class SEX {
        public static final String MALE = "男";
        public static final String FEMALE = "女";
        public static final String SECRECY = "男";
    }

    public static class QRCODE {
        public static final String COMMOM = "扫一扫";
        public static final String MICRO_CLASS = "签到签退";
        public static final String LUCK_SCAN = "幸运扫一扫";
        public static final String COURSE_ID = "COURSE_ID";
        public static final String FROM = "FROM";
    }

    public static class EMOJI {
        public static final String smile = "[smile]";
        public static final String angry = "[angry]";
        public static final String crazy = "[crazy]";
        public static final String distrust = "[distrust]";
        public static final String crying = "[crying]";

    }

    /**
     * <li>点击icon 跳转的方式：web ,原生，无操作
     * <li>@author 作者 : H2601977
     * <li>@version 创建时间：2016年9月10日 下午6:25:59
     */
    public static class MODE {
        public static final String NATIVE = "N";
        public static final String WEB = "W";
        public static final String DO_NOTHING = "";

    }

    /**
     * <li>缓存图片路径;缓存的txt文件名
     * <li>@author 作者 : H2601977
     * <li>@version 创建时间：2016年9月16日 下午3:08:34
     */
    public static class CacheFiles {
        public static final String MINE_MENU_ICON = "/menuimg/";// 保存不可删除的缓存
        public static final String FOOD_HOME = "/food/";// 保存不可删除的缓存
        public static final String FOOD_OTHER = "/foodothers/";// 保存可删除的缓存
        public static final String getFoodHomeInfo = "getFoodHomeInfo.txt";
        public static final String getFoodHomeArea = "getFoodHomeArea.txt";
        public static final String getPersonalTailorInfo = "getPersonalTailorInfo.txt";
    }

    public static class FACE {
        public static final String good = "[wx_00]";// good
        public static final String shy = "[wx_01]";// shy
        public static final String contempt = "[wx_02]";// contempt
        public static final String furious = "[wx_03]";// furious
        public static final String yell = "[wx_04]";// yell
    }

    /*
     * 园区生活 客服类型
     */
    public static class MTYPE {
        public static final String clothes = "32849";// 衣
        public static final String food = "32850";// 食
        public static final String reside = "32851";// 住
        public static final String walk = "32852";// 行
    }

    /*
     * 园区生活 问题类型
     */
    public static class CTYPE {
        public static final String complain = "32854";// 投诉
        public static final String suggest = "32855";// 建议
        public static final String cite = "32856";// 嘉奖
    }

    /**
     * 小微课堂-课程库测试相关常量
     *
     * @author F1228048 李周 2016-09-24
     */
    public static class Test {

        public static final String COURSE_ID = "course_id"; // 课程Id
        public static final String COURSE_NAME = "course_name"; // 课程名称
        public static final String CAN_TEST = "can_test"; // 是否可测试
        public static final String TEST_MODE = "test_mode"; // 测试考核类型
        public static final String CHALLENGE_MODE = "2"; // 挑战
        public static final String EXAM_MODE = "1"; // 考试
        public static final String TEST_RESULT = "test_result";
    }

    public static Map<String, String> getPersonalTailorOrderStatus() {

        Map<String, String> map = new HashMap<String, String>();
        map.put("10", "待接单");
        map.put("11", "待开始");
        map.put("12", "进行中");
        map.put("13", "待验收");
        map.put("14", "待评价");
        map.put("15", "已结案");
        map.put("16", "已取消");

        map.put("20", "待接单");
        map.put("21", "待开始");
        map.put("22", "进行中");
        map.put("23", "待验收");
        map.put("24", "待评价");
        map.put("25", "已结案");
        map.put("26", "已取消");
        return map;

    }


    /**
     * <li>描述：私人定制--发单、接单、待接单列表S8不同的TableBar对应的参数
     * <li>时间：2016年10月14日
     * <li>author： H2601977
     */
    public static Map<String, String> getInitiatedOrderListS8() {

        Map<String, String> map = new HashMap<String, String>();
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS1, "0");
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS2, "1");
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS3, "2");
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS4, "3");
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS5, "4");
        map.put(PersonalTailOrder.INITIATED_ORDER_STATUS8, "");// 全部发单

        map.put(PersonalTailOrder.RECEIVED_ORDER_STATUS1, "1");
        map.put(PersonalTailOrder.RECEIVED_ORDER_STATUS2, "2");
        map.put(PersonalTailOrder.RECEIVED_ORDER_STATUS3, "3");
        map.put(PersonalTailOrder.RECEIVED_ORDER_STATUS4, "4");
        map.put(PersonalTailOrder.RECEIVED_ORDER_STATUS7, "");// 全部接单
        map.put(AppContants.PersonalTailOrder.ALL_WAIT_ORDER, "0");

        return map;

    }

    public static class PersonalTailOrder {

        public static final int HELP_BUY = 0;// 代购
        public static final int HELP_DO = 1;// 代办
        public static final int HELP_QUEUE = 2;// 代排队

        public static final String INITIATED_ORDER = "1";// 我的发单
        public static final String RECEIVED_ORDER = "2";// 我的接单
        public static final String ALL_WAIT_ORDER = "0";// 所有的待接单列表

        public static final String INITIATED_ORDER_STATUS1 = "10";// 我的发单-待接单
        public static final String INITIATED_ORDER_STATUS2 = "11";// 我的发单-待开始
        public static final String INITIATED_ORDER_STATUS3 = "12";// 我的发单-进行中
        public static final String INITIATED_ORDER_STATUS4 = "13";// 我的发单-待验收
        public static final String INITIATED_ORDER_STATUS5 = "14";// 我的发单-待评价
        public static final String INITIATED_ORDER_STATUS6 = "15";// 我的发单-结案
        public static final String INITIATED_ORDER_STATUS7 = "16";// 我的发单-已取消

        public static final String INITIATED_ORDER_STATUS8 = "17";// 我的发单-全部

        public static final String RECEIVED_ORDER_STATUS1 = "21";// 我的接单-待开始
        public static final String RECEIVED_ORDER_STATUS2 = "22";// 我的接单-进行中
        public static final String RECEIVED_ORDER_STATUS3 = "23";// 我的接单-待验收
        public static final String RECEIVED_ORDER_STATUS4 = "24";// 我的接单-待评价
        public static final String RECEIVED_ORDER_STATUS5 = "25";// 我的接单-结案
        public static final String RECEIVED_ORDER_STATUS6 = "26";// 我的接单-已取消

        public static final String RECEIVED_ORDER_STATUS7 = "27";// 我的接单-全部

    }

    /**
     * <li>地区，区域
     * <li>@author 作者 : H2601977
     * <li>@version 创建时间：2016年10月18日 下午2:28:10
     */
    public static class Area {
        public static final String ZhengZhou = "0371";// 郑州
        public static final String GuanLan = "0755";// 观澜
        public static final String TaiYuan = "0351";// 太原
        public static final String PLACE = "PLACE";//
    }

    /**
     * <li>地区，区域
     * <li>@author 作者 : H2601977
     * <li>@version 创建时间：2016年10月18日 下午2:28:10
     */
    public static Map<String, String> getArea() {
        Map<String, String> map = new HashMap<String, String>();
        map.put(Area.ZhengZhou, "郑州");
        map.put(Area.GuanLan, "观澜");
        map.put(Area.TaiYuan, "太原");

        return map;
    }

    /**
     * <li>存储定位相关信息
     * <li>@author 作者 : H2603133
     * <li>@version 创建时间：2017年9月2日
     */
    public static class MAP {
        public static final String Province = "Province";// 省
        public static final String City = "City";// 市
        public static final String District = "District";// 区
        public static final String Latitude = "Latitude";// 纬度
        public static final String Longitude = "Longitude";// 经度
    }

    public enum SkinTag {
        SKIN_NAME,
        skin
    }


    public static class REPORTONLINE {

        public static final String IDCARD = "idCard";

        public static final String EMPNO = "empNo";

        public static final String NAME = "name";


    }

}
